package cn.sc.allinpay.allfavour.business.common.data;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * description：发券对象
 * author：pany
 * on 2018/9/4 16:25
 */
public class DistCouponData implements Parcelable {
    private int amtType;//0金额 1抵扣 2计次
    private String id;
    private String desc;
    private String name;
    private String unit;
    private String totCoup;
    private String amt;
    private int useNum;//使用数量

    public DistCouponData() {

    }

    protected DistCouponData(Parcel in) {
        amtType = in.readInt();
        id = in.readString();
        desc = in.readString();
        name = in.readString();
        unit = in.readString();
        totCoup = in.readString();
        amt = in.readString();
        useNum = in.readInt();
    }

    public int getAmtType() {
        return amtType;
    }

    public void setAmtType(int amtType) {
        this.amtType = amtType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getTotCoup() {
        return totCoup;
    }

    public void setTotCoup(String totCoup) {
        this.totCoup = totCoup;
    }

    public String getAmt() {
        return amt;
    }

    public void setAmt(String amt) {
        this.amt = amt;
    }

    public int getUseNum() {
        return useNum;
    }

    public void setUseNum(int useNum) {
        this.useNum = useNum;
    }

    public static final Creator<DistCouponData> CREATOR = new Creator<DistCouponData>() {
        @Override
        public DistCouponData createFromParcel(Parcel in) {
            return new DistCouponData(in);
        }

        @Override
        public DistCouponData[] newArray(int size) {
            return new DistCouponData[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(amtType);
        parcel.writeString(id);
        parcel.writeString(desc);
        parcel.writeString(name);
        parcel.writeString(unit);
        parcel.writeString(totCoup);
        parcel.writeString(amt);
        parcel.writeInt(useNum);
    }
}
